﻿namespace FFF.Test.Application.AppServices
{
    using System.Threading.Tasks;
    using Abp.Application.Services;
    using Abp.Application.Services.Dto;
    using Abp.Domain.Entities;
    using Abp.Runtime.Caching;
    using Microsoft.AspNetCore.Mvc;
    using FFF.Test.Application.AppServices.PublicService.Grid;
    using FFF.Test.Application.Framework.Dto;

    /// <summary>
    /// appervice的基类
    /// </summary>
    /// <typeparam name="TEntity">实体对象</typeparam>
    /// <typeparam name="TPrimaryKey">主键</typeparam>
    /// <typeparam name="TCreateInput">新增输入</typeparam>
    /// <typeparam name="TUpdateInput">删除输入</typeparam>
    /// <typeparam name="TEntityDto">实体输入</typeparam>
    /// <typeparam name="TView">view</typeparam>
    /// <typeparam name="TViewDto">viewdto实体</typeparam>
    public class YdmAbpCurdAppServiceBase<TEntity, TPrimaryKey, TCreateInput, TUpdateInput, TEntityDto, TView, TViewDto> :
        YdmAbpAppServiceBase,
        IYdmAbpCurdAppService<TEntity, TPrimaryKey, TCreateInput, TUpdateInput, TEntityDto, TView, TViewDto>
        where TEntity : class, IEntity<TPrimaryKey>
        where TView : class, IEntity<TPrimaryKey>
        where TViewDto : class
        where TCreateInput : class, IEntityDto<TPrimaryKey>
        where TUpdateInput : class, IEntityDto<TPrimaryKey>
        where TEntityDto : class, IEntityDto<TPrimaryKey>
    {
        /// <summary>
        /// 获取表格汇总数据
        /// </summary>
        /// <param name="inDto">输入Dto</param>
        /// <returns>输出dto</returns>
        [HttpPost]
        public virtual Task<GetGridSummaryOutDto> GetGridSummary(GetGridSummaryInDto inDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>   
        ///  获取视图分页信息obj 通过select("new(CompanyName as Name, Phone)") 这种方式获取
        /// </summary>
        /// <param name="pagedInputDto">分页输入的Dto</param>
        /// <returns>分页对象</returns>
        public virtual Task<MyPagedResult<object>> GetViewPageSelect(PagedInputDto pagedInputDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 导入数据
        /// </summary>
        /// <param name="inDto">导入对象</param>
        /// <returns>提示信息</returns>
        [HttpPost]
        public virtual Task<ImportOutDto> ImportExcel(ImportInDto inDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 导出表格数据
        /// </summary>
        /// <param name="inDto">获取导出表格数据输入dto</param>
        /// <returns>dto对象</returns>
        [HttpGet]
        public virtual Task<FileContentResult> GetGridExcel(GetGridListInDto inDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 获取表格数据
        /// </summary>
        /// <param name="inDto">获取表格数据输入dto</param>
        /// <returns>dto对象</returns>
        [HttpPost]
        public virtual Task<GridResult> GetGridDto(GetGridListInDto inDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>   
        ///  通过视图获取分页分页
        /// </summary>
        /// <param name="pagedInputDto">分页输入的Dto</param>
        /// <returns>分页对象</returns>
        [HttpPost]
        public virtual Task<MyPagedResult<TViewDto>> GetViewPage(PagedInputDto pagedInputDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="input">indto</param>
        /// <returns>entityDto</returns>
        [HttpPost]
        public virtual Task<TEntityDto> CreateByDto(TCreateInput input)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 批量更新
        /// </summary>
        /// <param name="input">更新的实体的对象</param>
        /// <returns>更新后的对象</returns>
        [HttpPost]
        public virtual Task BatchUpdateByDto(BatchUpdateInDto input)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="input">indto</param>
        /// <returns>entityDto</returns>
        [HttpPost]
        public virtual Task<TEntityDto> UpdateByDto(TUpdateInput input)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 获取viewdto
        /// </summary>
        /// <param name="idDto">实体的IdDto</param>
        /// <returns>viewdto</returns>
        [HttpPost]
        public virtual Task<TViewDto> GetViewDto(PrimaryDto idDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="idDto">实体的IdDto</param>
        /// <returns>空</returns>
        [HttpPost]
        public virtual Task DeleteByDto(PrimaryDto idDto)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="idDto">实体的IdDto</param>
        /// <returns>空</returns>
        [HttpPost]
        public virtual Task BatchDelete(PrimaryDto idDto)
        {
            throw new System.NotImplementedException();
        }
    }
}
